package jolly.clipboard.dao.impl;

import jolly.clipboard.dao.ClipboardFacade;
import jolly.clipboard.domain.Clipboard;
import jolly.clipboard.domain.ModificationTicket;

/**
 * Created by IntelliJ IDEA.
 * User: david
 * Date: 12/17/11
 * Time: 8:52 AM
 * To change this template use File | Settings | File Templates.
 */
public class ClipboardFacadeImpl implements ClipboardFacade {

    private Clipboard clipboard;

    private ModificationTicket modificationTicket;

    public ClipboardFacadeImpl() {
        clipboard = new Clipboard();
    }

    @Override
    public Clipboard getClipboard() {
        return clipboard;
    }

    @Override
    public void append(String text) {
        clipboard.setText(clipboard.getText() + "\n" + text);
    }

    @Override
    public void setClipboard(Clipboard clipboard) {
        this.clipboard = clipboard;
    }

    @Override
    public ModificationTicket getModificationTicket() {
        return modificationTicket;
    }

    @Override
    public void setModificationTicket(ModificationTicket modificationTicket) {
        this.modificationTicket = modificationTicket;
    }
}
